//
//  HRFunChatFrameModel.m
//  Hear
//
//  Created by mac on 2017/8/7.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HRFunChatFrameModel.h"

@implementation HRFunChatFrameModel
-(void)setFunModel:(HRFunChatModel *)funModel{
    _funModel = funModel;
    CGFloat leftPading = 20;
    
    NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
    paraStyle.lineSpacing = 10;
    NSDictionary *dic = @{NSFontAttributeName:CustomUIFont(13), NSParagraphStyleAttributeName:paraStyle, NSKernAttributeName:@0.0f
                          };
    CGFloat titleHeight = [funModel.TopicTitle boundingRectWithSize:CGSizeMake(kFullWidth-leftPading*2, HUGE) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil].size.height;
    
    
    _backViewRect = CGRectMake(leftPading, 0, kFullWidth-leftPading*2, titleHeight+20);
    
    _titleLabelRect = CGRectMake(leftPading, 0, _backViewRect.size.width-leftPading*2, _backViewRect.size.height);
    
    _cellHeight = CGRectGetMaxY(_backViewRect) + 10;
    
}
@end
